package homework.day06;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.Random;

public class Test1 {
    public static void main(String[] args) throws IOException {
        RandomAccessFile raf=new RandomAccessFile("test.txt","r");
        RandomAccessFile desc=new RandomAccessFile("test_copy.txt","rw");
        int len;
        byte[] data=new byte[1024*10];
        while((len = raf.read(data))!=-1){
            desc.write(data);
        }
        System.out.println("完毕");
        raf.close();
        desc.close();

    }

}


